<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%
String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>编辑设备</title>
	<style type="text/css">
		.dx { width:350px;margin:10px auto;font-size:14px;  }
		.dx span { display:inline-block; width: 100px;height:30px; line-height:30px; margin-right:10px;text-align:right; }	
	</style>
	<script type="text/javascript" src="scripts/jquery-3.1.1.min.js"></script>
	<script type="text/javascript" src="scripts/editdevice.js"></script>
</head>

<body>
	<div style="width:350px;height:630px; margin:50px auto; padding-top:20px;border:black 1px solid;">
	<form> 
		<div class="dx">
    		<span>部门名</span>
    		<select name="department" id="department"></select>
    	</div>
		<div class="dx">
    		<span>区域名</span>
    		<select name="region" id="region" onchange="onBuilding()"></select>
    	</div>
    	<div class="dx">
    		<span>建筑名</span>
    		<select name="building" id="building" onchange="onRoom()"></select>
    	</div>
    	<div class="dx">
    		<span>房间号</span>
    		<select name="room" id="room"></select>
    	</div>	
    	<div class="dx">
    		<span>设备状态</span>
    		<select name="status" id="status">
    			<option value="0">正常</option>
    			<option value="1">关闭</option>
    			<option value="2">故障</option>
    		</select>
    	</div>
    	<div class="dx">
    		<span>设备名称</span>
    		<input type="text" id="name" name="name"/>
    	</div>
    	<div class="dx">
    		<span>设备编号</span>
    		<input type="text" id="number" name="number"/>
    	</div>
    	<div class="dx">
    		<span>设备型号</span>
    		<input type="text" id="model" name="model"/>
    	</div>
    	<div class="dx">
    		<span>额定功率</span>
    		<input type="text" id="power" name="power"/><label>&nbsp;W</label>
    	</div>
    	<div class="dx">
    		<span>额定电压</span>
    		<input type="text" id="voltage" name="voltage"/><label>&nbsp;V</label>
    	</div>
    	<div class="dx">
    		<span>额定电流</span>
    		<input type="text" id="current" name="current"/><label>&nbsp;A</label>
    	</div>
    	<div class="dx">
    		<span>生产日期</span>
    		<input type="text" id="devicedate" name="devicedate"/>
    	</div>
   		<div class="dx">
    		<span>工作环境</span>
    		<textarea id="environment" name="environment" style="width:200px;height:80px;vertical-align:top;resize:none;"></textarea>
    	</div>
    	<div style="width:350px;"><p style="text-align:center;"><input type="button" value="提交" onclick="editdevice()"/></p></div>
	</form>
	</div>
</body>
</html>